package com.google.code.hibernate.rest.representation;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

/**
 * 
 * @author wangzijian
 * 
 */
public class CategoryList extends ArrayList<String> {

	private static final long serialVersionUID = 1L;

	public CategoryList(Collection<? extends String> collection) {
		super(sort(collection));
	}

	private static Collection<? extends String> sort(Collection<? extends String> collection) {
		List<String> list = new ArrayList<String>(collection);
		Collections.sort(list);
		return list;
	}

}
